
#include<cppinterface.h>

#pragma warning (disable : 4996)
using namespace System;


MyMatrix // Adds two matrices
AddMatrix(const MyMatrix& A // Matrix One
       , const MyMatrix& B // Matrix Two 
       )
{
    if (A.rows() != B.rows())
		throw "Row size don not match";

   if (A.columns() != B.columns())
		throw "Column size don not match";

   MyMatrix C(A.rows(), A.columns());

   for (size_t i = 0; i < A.rows(); i++)
	   for (size_t j = 0; j < A.columns(); j++)
		   C(i,j) = A(i,j) + B(i,j);

   return C;
 
}
